package com.example.service.impl;

import com.example.entity.Person;
import com.example.mapper.PersonMapper;
import com.example.service.PersonService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 人类 服务实现类
 * </p>
 *
 * @author fbb 2763175463@126.com
 * @since 2021-11-30
 */
@Service
public class PersonServiceImpl extends ServiceImpl<PersonMapper, Person> implements PersonService {
    @Autowired
    private PersonMapper personMapper;

    public Map<String,Object> select(){
        List<Person> people = personMapper.select();
        Map<String, Object> map = new HashMap<>();
        map.put("code",200);
        map.put("msg","查询成功");
        map.put("data",people);
        return  map;


    }
}
